Version

SortMergeGeneric<T>(T[],T[],IComparer<T>) Method

Sorts the passed in array based on the passed in comparer using a modified merge-sort algorithm. Optionally you can pass in a temporary array equal (or greater) in size to arr. The method will make use of that array instead of allocating one. If null is passed in, then it will allocate one. Merge sort should be used if the operation of comparing items is expensive.
Syntax
public static void SortMergeGeneric<T>( 
   T[] array,
   T[] tempArray,
   IComparer<T> comparer
)

Parameters

array
Array to be sorted.
tempArray
Null or a temporary array equal (or greater) in size to array.
comparer
Comparer.

Type Parameters

T
Requirements

Target Platforms: Android 4.4+, iOS 8+

Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+

See Also